import React from 'react'
import {useLocation} from "react-router-dom"

export default function Detail() {
  // const {state} = useLocation()
  // const {id, title, content} = state

  const {state: {id, title, content}} = useLocation()

  return (
    <div>
      <p>消息编号：{id}</p>
      <p>消息标题：{title}</p>
      <p>消息内容：{content}</p>
    </div>
  )
}
